﻿<Window x:Class="TFSTools.TestManagement.TestCaseReview.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="TFS Test Case Preview" Height="600" Width="900" Activated="Window_Activated" Icon="/TFSTools.TestManagement.TestCaseReview;component/Graphics/app.ico">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" />
                <ColumnDefinition />
                <ColumnDefinition Width="auto" />
            </Grid.ColumnDefinitions>
            <Label Grid.Column="0" Content="Connection:" Margin="3"></Label>
            <TextBox x:Name="tbxTFSServerInfo" Grid.Column="1" Margin="3" IsReadOnly="True" Text="Click 'Connect...'"></TextBox>
            <Button x:Name="btnConnect" Grid.Column="2" Content="Connect..." Margin="3" Padding="10,1" Click="ConnectButton_Click"></Button>
        </Grid>
        <ComboBox x:Name="cmbQueryList" Grid.Row="1" Margin="3" SelectionChanged="QueryListComboBox_SelectionChanged" />
        <StackPanel Grid.Row="2" Orientation="Horizontal" >
            <Button x:Name="btnRefresh" Content="Refresh Query" Margin="3" Padding="10,1" Click="RefreshButton_Click" />
            <Button x:Name="btnOpenTestCase" Content="Open Test Case..." Margin="3" Padding="10,1" Click="OpenTestCaseButton_Click" IsEnabled="False" />
            <RichTextBox Width="300"></RichTextBox>
        </StackPanel>
        <DataGrid x:Name="dgWorkItems" 
                  Grid.Row="3" 
                  Margin="3"
                  AutoGenerateColumns="False"
                  CanUserAddRows="False"
                  CanUserDeleteRows="False"
                  CanUserResizeRows="False"
                  RowHeaderWidth="0"
                  ScrollViewer.CanContentScroll="True"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  SelectionUnit="FullRow" SelectionChanged="WorkItemsGrid_SelectionChanged">
            <DataGrid.CellStyle>
                <Style TargetType="DataGridCell">
                    <Setter Property="BorderThickness" Value="0"/>
                    <Setter Property="BorderBrush" Value="White" />
                </Style>
            </DataGrid.CellStyle>
            <DataGrid.Columns>
                <DataGridTextColumn Header="ID"
                                    Binding="{Binding Path=Id, Mode=OneWay}"
                                    CanUserSort="True"
                                    SortMemberPath="Id"
                                    SortDirection="Ascending"
                                    MinWidth="80"
                                    Width="80" />
                <DataGridTextColumn Header="Work Item Type"
                                    Binding="{Binding Path=Type.Name, Mode=OneWay}"
                                    CanUserSort="True"
                                    MinWidth="80"
                                    Width="100" />
                <DataGridTextColumn Header="Title"
                                    Binding="{Binding Path=TreeTitle, Mode=OneWay}"
                                    CanUserSort="True"
                                    MinWidth="80"
                                    Width="*" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>
